#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
double fact1(double a) {
	if (a == 0 || a == 1) {
		return 1;
	}
	else {
		return fact1(a - 1) * a;
	}
}
double fact2(double b) {
	if (b == 0) {
		return 1;
	}
	else {
		return fact2(b - 1) * (2 * b + 1);
	}
}
int main()
{
	double eps = 0;
	scanf("%le", &eps);
	int i = 0;
	double sum = 0;
	while(1) {
		sum += fact1(i) / fact2(i);
		if (fact1(i) / fact2(i) < eps) {
			break;
		}
		i++;
	}
	printf("PI = %.5lf", 2*sum);
	return 0;
}